<?php

/**
 * 文档控制器
 * @author yuzy 2015-5-13
 */

namespace mybackend\controllers;

use common\services\myhtsq\DocumentService;

class DocumentController extends BaseController {

    protected $_documentService;

    public function __construct($id, $module, DocumentService $documentService, $config = []) {
        $this->_documentService = $documentService;
        parent::__construct($id, $module, $config);
    }

    /**
     * 文档列表
     * @param string $businessId 业务id
     * @return array
     */
    public function actionGetDocumentListByBusinessId($businessId) {
        $result = $this->_documentService->getDocumentListByBusinessId($businessId);
        $this->exportJson($result, $this->_documentService->getErrCode(), $this->_documentService->getErrMsg()); 
    }
}
